package samsung.sds.survey.surveyManagement.dao;

import java.util.List;
import java.util.Map;

import samsung.sds.departmentManagement.model.DepartmentEntity;
import samsung.sds.survey.surveyManagement.model.SurveyUserEntity;
import samsung.sds.system.common.baseQuery.BaseMapper;
import samsung.sds.userManagement.model.UserEntity;

/**
 * @author tingcai.liu
 * @createDate 2016-01-15
 * 
 * 问卷发布的Mapper
 */
public interface SurveyReleaseMapper extends BaseMapper<SurveyUserEntity> {
    /**
     * 查找指定问卷的用户的个数
     *
     * @param surveyId
     * @return
     */
    public int selectTF_F_SURVEY_USER(String surveyId);

    /**
     * 查找已投票用户数
     *
     * @param surveyId
     * @return
     */
    public int selectTF_F_SURVEY_RESULT(String surveyId);
    
    
    /**
	 * 根据问卷ID查询参与投票的部门ID
	 * @param surveyId
	 * @return
	 */
	public List<DepartmentEntity> departmentCheckList( String surveyId );
	
	/**
	 * 根据部门ID,问卷ID查询没有参与投票的人数
	 * @param param
	 * @return
	 */
	public int queryDepartmentUsersListN(SurveyUserEntity su_temp);
	
	/**
	 * 根据部门ID,问卷ID查询部门总人数
	 * @param surveyId
	 * @param depart 
	 * @return
	 */
	public int queryDepartmentUsersListAll(SurveyUserEntity su_temp);
    
    /**
     * 查询is_join为N的用户，进行插入操作
     * @param surveyUser
     * @return
     */
    public List<SurveyUserEntity> getCheckedUser(SurveyUserEntity surveyUser);
    
    /**
     * 查询is_join为Y的用户，进行删除操作
     * @param surveyUser
     * @return
     */
	public List<SurveyUserEntity> getNocheckedUser(SurveyUserEntity surveyUser);
	
	 /**
     * 查询此组下参与此问卷的用户
     * 
     * @param surveyUser
     * @return
     */


    public List<SurveyUserEntity> selectUserExistInSurvey(SurveyUserEntity surveyUser);
    
    /**
     * 查询此组下未参与此问卷的用户
     *
     * @param surveyUser
     * @return
     */

	public List<SurveyUserEntity> selectUserNotExistInSurvey(SurveyUserEntity surveyUser);
	
	/**
	 * 根据groupId 查询这个组下面所有成员信息
	 * @param surveyId
	 * @return
	 */

	public List<UserEntity> selectSYS_USER(Map<String, Object> map);
	
	 /**
     * 查询组内所用用户
     *
     * @param surveyUser
     * @return
     */

	public int queryGroupUsersListAll(SurveyUserEntity listForCheck);
	
	 /**
     * 查询组内参与投票的用户
     *
     * @param surveyUser
     * @return
     */

	public int queryGroupUsersListY(SurveyUserEntity listForCheck);
	


}
